package Chapter02.Homework.H20211110;

import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Scanner;

public class Work04 {
    public static void main(String[] args) {
        Scanner input=new Scanner(System.in);
        System.out.println("今年的星期天号数：");
        Calendar c=Calendar.getInstance();
        for (int i=0;i<365;i++){
            if(c.get(Calendar.DAY_OF_WEEK)==1){
                System.out.println(new SimpleDateFormat("dd日").format(c.getTime()));
            }
            c.add(Calendar.DAY_OF_WEEK,1);
        }
    }
}
